﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
        xmlns:local="clr-namespace:SGT"
        xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
        xmlns:DV="clr-namespace:System.Windows.Controls.DataVisualization;assembly=System.Windows.Controls.DataVisualization.Toolkit"
        xmlns:DVC="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="SGT.MainWindow"
        xmlns:r="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"
        Title="MainWindow"
        Height="802"
        Width="1213"
       DataContext="{Binding Main, Source={StaticResource Locator}}">
        
    
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Skins/MainSkin.xaml" />
            </ResourceDictionary.MergedDictionaries>
        	<DataTemplate x:Key="DataTemplate1">
                <DVC:Chart Title="{Binding Path=Titulo}" Canvas.Top="10" />

            </DataTemplate>
            <Style x:Key="LegendStyle" TargetType="Control">
                <Setter Property="Template" Value="{x:Null}"/>
                <Setter Property="BorderBrush" Value="Transparent"></Setter>
                <Setter Property="Background" Value="Transparent"></Setter>
            </Style>

        </ResourceDictionary>
    </Window.Resources>

 
    


    <Grid x:Name="LayoutRoot">
        <Grid.ColumnDefinitions>
            
            <ColumnDefinition Width="956*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="135" />
            <RowDefinition Height="178*" />
            <RowDefinition Height="450*" />
        </Grid.RowDefinitions>
        
        <Frame Grid.Row="2" x:Name="frame1" NavigationUIVisibility="Hidden" Grid.Column="2" />
        <Grid  Grid.ColumnSpan="2" Grid.Row="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="Auto" Width="Auto" >
      
                <ItemsControl IsTabStop="False" ItemsSource="{Binding Path=Charts}" Width="auto" Height="auto" HorizontalContentAlignment="Stretch">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                            <DVC:Chart Title="{Binding Path=Titulo}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"  Width="Auto" Height="Auto"  LegendStyle="{StaticResource LegendStyle}">
                            <DVC:ColumnSeries ItemsSource="{Binding Path=ListaUso}" DependentValueBinding="{Binding Path=Valor}" IndependentValueBinding="{Binding Path=Nombre}">
                                <DVC:ColumnSeries.DependentRangeAxis>
                                    <DVC:LinearAxis
                        Orientation="Y"
                        Minimum="0"
                        Maximum="20"
                        Title="Toneladas"
                        ShowGridLines="True" />
                                </DVC:ColumnSeries.DependentRangeAxis>
                            </DVC:ColumnSeries>
                                
                            </DVC:Chart>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <UniformGrid Rows="1"  Width="auto" Height="auto" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
            </ItemsControl>

        </Grid>
    </Grid>

</Window>
